package global

import (
	"gorm.io/gorm"
	"news/config"
)

type News struct {
	Title      string
	Content    string
	Url        string
	CategoryId int
}

var (
	DB           *gorm.DB
	Config       *config.Config = &config.Config{} //配置文件加载配置
	User         interface{}
	WebsiteIndex = "website:index" //统计数据
	WebsiteCate  = "website:cate"  //网站栏目
)

var Content = make(chan []News, 1000)

// AllUrlAddress 采集地址
var AllUrlAddress = map[string]string{
	"a": "http://china.qianlong.com/",
	"b": "http://www.bjnews.com.cn/news",
	"c": "https://www.southcn.com/node_b5769d65fb?cms_node_post_list_page=1",
	"d": "https://news.china.com/domestic/index.html",
	"e": "https://www.thepaper.cn/",
	"f": "https://news.cctv.com/2019/07/gaiban/cmsdatainterface/page/news_1.jsonp?cb=news",
	"g": "http://news.sina.com.cn/world/",
}
